{#
    @default_language   System default language.
    cn,
    [msg],
#}

{% extends "layout.html" %}

{% from "macros/general.html" import
        display_reset_password,
        display_preferredLanguage,
        display_add_admin,
        with context
        %}
{% from "macros/msgHandlers.html" import adminMsgHandler with context %}

{% block navlinks_active_create %}class="active"{% endblock %}

{% block title %}{{ _('Add admin') }}{% endblock title %}

{% block main %}
{# Show system message #}
{{ adminMsgHandler(msg) }}

<div class="content-box">
    <div class="box-body">
        <div class="box-header clear">
            {# -- Tabs -- #}
            <ul class="tabs clear">
                <li><a href="{{ctx.homepath}}/admins">{{ _('All admins') }}</a></li>
                <li class="active"><a href="{{ctx.homepath}}/create/admin"><img src="{{ctx.homepath}}/static/{{skin}}/images/ico_add_12.png" class="vcenter" />&nbsp;{{ _('Add admin') }}</a></li>
            </ul>

            <h2>{{ _('Add admin') }}</h2>
        </div>

        <div class="columns clear">
            <div class="col2-3">
                {{ display_add_admin(
                        min_passwd_length=min_passwd_length,
                        max_passwd_length=max_passwd_length,
                        lang=default_language,
                        languagemaps=languagemaps,
                        )
                        }}
            </div>

            <div class="box-wrap clear">
            <div class="col1-3 lastcol">
                <div class="mark_blue bt-space10">
                    <h4>{{ _('Need a random password?') }}</h4>
                    <p class="clean-padding clean-padding bt-space10">{{ min_passwd_length | getRandomPassword}}</p>
                </div>
            </div>
            </div>
        </div>
    </div>
</div>

{% endblock main %}
